package jp.co.sn.mml.pojo.tmkyz;

import jp.co.sn.mml.pojo.tmyz.Tmyz;

public class TmkyzId implements java.io.Serializable { 

	//菌コード
	private String kinCd;
	//薬剤コード
	private Tmyz yzCd;

	/** default constructor */
	public TmkyzId(){

	}

	/** full constructor */
	public TmkyzId(String kinCd,Tmyz yzCd){
		this.kinCd = kinCd;
		this.yzCd = yzCd;
	}

	//Property accessors
	public String getKinCd(){
		return this.kinCd;
	}

	public void setKinCd(String kinCd){
		this.kinCd=kinCd;
	}

	public Tmyz getYzCd(){
		return this.yzCd;
	}

	public void setYzCd(Tmyz yzCd){
		this.yzCd=yzCd;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TmkyzId))
			return false;

		TmkyzId castOther = (TmkyzId) other;

		return ((this.getKinCd() ==  castOther.getKinCd())
				||(this.getKinCd()!=null && castOther.getKinCd() !=null 
					&& castOther.getKinCd() !=null 
					&& this.getKinCd().equals(castOther.getKinCd())))
			&& ((this.getYzCd() ==  castOther.getYzCd())
				||(this.getYzCd()!=null && castOther.getYzCd() !=null 
					&& castOther.getYzCd() !=null 
					&& this.getYzCd().equals(castOther.getYzCd())))
;	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getKinCd() == null ? 0 : this.getKinCd().hashCode());
		result = 37 * result
				+ (getYzCd() == null ? 0 : this.getYzCd().hashCode());
		return result;
	}

}